Optimal. Leaf size=83 \[ \frac {b^2}{2 a^2 f (a+b) \left (a \cos ^2(e+f x)+b\right )}+\frac {b (2 a+b) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^2 f (a+b)^2}+\frac {\log (\sin (e+f x))}{f (a+b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4138, 446, 88} \[ \frac {b^2}{2 a^2 f (a+b) \left (a \cos ^2(e+f x)+b\right )}+\frac {b (2 a+b) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^2 f (a+b)^2}+\frac {\log (\sin (e+f x))}{f (a+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 88
Rule 446
Rule 4138
Rubi steps
\begin {align*} \int \frac {\cot (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x^5}{\left (1-x^2\right ) \left (b+a x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {x^2}{(1-x) (b+a x)^2} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (-\frac {1}{(a+b)^2 (-1+x)}+\frac {b^2}{a (a+b) (b+a x)^2}-\frac {b (2 a+b)}{a (a+b)^2 (b+a x)}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=\frac {b^2}{2 a^2 (a+b) f \left (b+a \cos ^2(e+f x)\right )}+\frac {b (2 a+b) \log \left (b+a \cos ^2(e+f x)\right )}{2 a^2 (a+b)^2 f}+\frac {\log (\sin (e+f x))}{(a+b)^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.33, size = 112, normalized size = 1.35 \[ \frac {\sec ^4(e+f x) (a \cos (2 (e+f x))+a+2 b)^2 \left (\frac {b^2 (a+b)}{a^2 \left (-a \sin ^2(e+f x)+a+b\right )}+\frac {b (2 a+b) \log \left (-a \sin ^2(e+f x)+a+b\right )}{a^2}+2 \log (\sin (e+f x))\right )}{8 f (a+b)^2 \left (a+b \sec ^2(e+f x)\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 138, normalized size = 1.66 \[ \frac {a b^{2} + b^{3} + {\left (2 \, a b^{2} + b^{3} + {\left (2 \, a^{2} b + a b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right ) + 2 \, {\left (a^{3} \cos \left (f x + e\right )^{2} + a^{2} b\right )} \log \left (\frac {1}{2} \, \sin \left (f x + e\right )\right )}{2 \, {\left ({\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{4} b + 2 \, a^{3} b^{2} + a^{2} b^{3}\right )} f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.09, size = 155, normalized size = 1.87 \[ \frac {b \ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{f \left (a +b \right )^{2} a}+\frac {b^{2} \ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 f \left (a +b \right )^{2} a^{2}}+\frac {b^{2}}{2 f \left (a +b \right )^{2} a \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}+\frac {b^{3}}{2 a^{2} \left (a +b \right )^{2} f \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right )}{2 f \left (a +b \right )^{2}}+\frac {\ln \left (1+\cos \left (f x +e \right )\right )}{2 f \left (a +b \right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 117, normalized size = 1.41 \[ \frac {\frac {b^{2}}{a^{4} + 2 \, a^{3} b + a^{2} b^{2} - {\left (a^{4} + a^{3} b\right )} \sin \left (f x + e\right )^{2}} + \frac {{\left (2 \, a b + b^{2}\right )} \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{4} + 2 \, a^{3} b + a^{2} b^{2}} + \frac {\log \left (\sin \left (f x + e\right )^{2}\right )}{a^{2} + 2 \, a b + b^{2}}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.85, size = 106, normalized size = 1.28 \[ \frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )}{f\,\left (a^2+2\,a\,b+b^2\right )}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,a^2\,f}-\frac {b}{2\,a\,f\,\left (a+b\right )\,\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a+b\right )}+\frac {b\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a+b\right )\,\left (2\,a+b\right )}{2\,a^2\,f\,{\left (a+b\right )}^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cot {\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________